<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	pageContext.setAttribute("basePath", basePath);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Smart Link</title>
<link href="${basePath }css/login.css" rel="stylesheet" type="text/css"
	media="all" />
<!-- Custom Theme files -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords"
	content="Plans & Pricing Tables Responsive, Login form web template, Sign up Web Templates, Flat Web Templates, Login signup Responsive web template, Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyEricsson, Motorola web design" />
<script type="text/javascript" src="${basePath }js/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	  $("#btnCode").click(function(){
		  var urlPath="${basePath}sendIdentifiCode";
		  var emailStr=$("#email").val();
		  if(emailStr==null||emailStr==""){
			  alert("请输入邮箱地址");
			  return false;
		  }
	 	  $.ajax({url:urlPath,async:false,data:{email:emailStr}});
	 	 	alert("验证码以发送到您的邮箱，请注意查收。");
	 	 	return true;
	  });
	});
</script>

</head>
<body>
	<div class="main">
		<div class="login">
			<div class="login-top">
				<img src="${basePath }images/p.png">
			</div>
			<h1>Smart Link</h1>
			<div class="login-bottom">
				<form action="loginByCode" method="post">
					<input id="email" name="email" type="text" placeholder="请输入登录电子邮件" required=" ">
				    <input name="paramCode" type="text" class="password" placeholder="请输入验证码" required=" ">
					<button id="btnCode" type="button" style="position: relative; left: 180px; top: -20px;">发送验证码</button>
					<input type="submit" value="验证">
				</form>
				<label
					style="color: red; position: relative; left: 70px; top: 20px;"><s:fielderror fieldName="login"></s:fielderror></label>
			</div>
		</div>
	</div>
	<div class="footer">
		<p>
			&copy 2016 Smart Link Login Form . All rights reserved | Design by <a
				href="#">吉祥软件工作室</a>
		</p>
	</div>

</body>
</html>